import React from "react";
import './nav.scss';

export class NavComponent extends React.Component{

    goBack(){

        this.props.history.goBack();

    }

    render(){

        return <div className="nav">
            <span onClick={this.goBack.bind(this)}>
                <svg className="icon" aria-hidden="true">
                    <use xlinkHref="#icon-return" />
                </svg>
            </span>
            {this.props.title}
        </div>

    }

}